/*
 * @Author: DUST
 * @Date: 2023-05-16 17:04:03
 * @LastEditors: DUST
 * @LastEditTime: 2023-05-16 17:04:06
 * @FilePath: \vite-project\src\utils\useForm.ts
 * @Description: 
 * undefined
 */
import { ref, Ref } from "vue";
import type { FormInstance } from "ant-design-vue"
const useForm = <T>(params: T) => {
  const obj = { ...params };
  const formref = ref() as Ref<FormInstance>;
  const formModel = ref<Record<keyof T, any>>(obj);

  return {
    formref,
    formModel
  };
};
export default useForm;
